<!--  -->
<template>
  <div class="box">组件2
    <el-pagination background layout="prev, pager, next" :total="1000" />
  </div>
</template>

<script lang='ts' setup>
import { reactive,toRefs,ref,onMounted, onUnmounted,onActivated, onDeactivated} from 'vue'

onMounted(() => {
  console.log('组件2加载完成')
})
onUnmounted(() => {
  console.log('组件2卸载')
})

onActivated(() => {
  console.log('组件2激活 /显示')
})
onDeactivated(() => {
  console.log('组件2失活/隐藏')
})
</script>
<style scoped>
.box{
    width: 100%;
    height: 100px;
    background-color: yellow;
}
</style>